﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace triangleSurface
{
    class triangleSurface
    {
        static double TriSurface(int side,int altitude)
        {
            double surf=(side*altitude)/2;
            return surf;
        }
        static double SurfaceByTriSides(int sideA, int sideB, int sideC)
        {
            int c = sideC;
            int b = sideB;
            int a = sideA;

            //if (sideA > sideC)
            //{
            //    c = sideA;
            //    a = sideA;
            //}
            //if (sideB > sideC)
            //{
            //    c = sideB;
            //    b = sideC;
            //}
            double p= (a+b+c)/2;
            double surf = Math.Sqrt(p * (p - a) * (p - b) * (p - c));
            return surf;
        }
        static double TriSurface(int a, int b, double gamma)
        {
            double n = gamma * (Math.PI / 180);
            double surf = (a*b*Math.Sin(n))/2;
            return surf;
        }
        static void Main(string[] args)
        {
            Console.WriteLine("Side A:");
            int a = int.Parse(Console.ReadLine());
            Console.WriteLine("Side B:");
            int b = int.Parse(Console.ReadLine());
            Console.WriteLine("Side C:");
            int? c = int.Parse(Console.ReadLine());
            Console.WriteLine("Angel :");
            double? gamma = double.Parse(Console.ReadLine());
            if (c == null)
            {
                Console.WriteLine(TriSurface(a, b));
            }
            Console.WriteLine();
            //double grad = 30;
            //double n = grad *(Math.PI/180);
            //Console.WriteLine(System.Math.Sin(n)); 
        }
    }
}
